package com.eh.iteratorAndComposition;

import com.eh.iteratorAndComposition.base.MenuComponent;
import com.eh.iteratorAndComposition.modle.DinnerMenu;
import com.eh.iteratorAndComposition.modle.PancakeHouseMenu;
import com.eh.iteratorAndComposition.modle.ParentMenu;
import com.eh.iteratorAndComposition.modle.Waitress;

/**
 * Created by David on 2016/5/1.
 */
public class IteratorAndCompositionDriveTest {
    public static void main(String[] args) {
        MenuComponent parentMenu = new ParentMenu();
        parentMenu.add(new PancakeHouseMenu());
        parentMenu.add(new DinnerMenu());

        Waitress waitress = new Waitress(parentMenu);
        waitress.printMenus();
        System.out.println("\n=====================素食系列======================\n");
        waitress.printVegetarianMenuItem();
    }
}
